import React from 'react';
import { Switch, Route } from 'react-router-dom';
import ProductList from './ProductList';
import Product from './Product';

export const ProductManagement = ({ match }) => {
  return (
    <Switch>
      <Route path={`${match.url}`} exact component={ProductList} />
      <Route path={`${match.url}/:id`} component={Product} />
    </Switch>
  );
};
